﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserNestedMasterPage.master" AutoEventWireup="true" CodeBehind="AvailableJobs.aspx.cs" Inherits="JobbJaktWeb.AvailableJobs" %>
<%@ Import Namespace="JobbJakt" %>

<%--<%@ Page Title="" Language="C#" MasterPageFile="~/UserMasterPage.Master" AutoEventWireup="true" CodeBehind="AvailableJobs.aspx.cs" Inherits="JobbJaktWeb.AvailableJobs" %>--%>
<%--<%@ Import Namespace="JobbJakt" %>--%>
<%--<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>--%>
<%--<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">--%>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <asp:ListView ID="ListView1" runat="server" DataSourceID="advertisement" OnSelectedIndexChanged="ListView1_SelectedIndexChanged" DataKeyNames="AdvertisementID" OnItemCommand="ListView1_ItemCommand">
            <ItemTemplate>
                <span style="">AdvertisementID:
                <asp:Label ID="AdvertisementIDLabel" runat="server" Text='<%# Eval("AdvertisementID") %>' />
                <br />
                RegistrationDate:
                <asp:Label ID="RegistrationDateLabel" runat="server" Text='<%# Eval("RegistrationDate") %>' />
                <br />
                Title:
                <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
                <br />
                Position:
                <asp:Label ID="PositionLabel" runat="server" Text='<%# Eval("Position") %>' />
                <br />
                ExpirationDate:
                <asp:Label ID="ExpirationDateLabel" runat="server" Text='<%# Eval("ExpirationDate") %>' />
                <br />
                Category:
                <asp:Label ID="CategoryLabel" runat="server" Text='<%# Eval("Category") %>' />
                <br />
                Salary:
                <asp:Label ID="SalaryLabel" runat="server" Text='<%# Eval("Salary") %>' />
                <br />
                TypeOfEmployment:
                <asp:Label ID="TypeOfEmploymentLabel" runat="server" Text='<%# Eval("TypeOfEmployment") %>' />
                <br />
                CompanyContactID:
                <asp:Label ID="CompanyContactIDLabel" runat="server" Text='<%# Eval("CompanyContactID") %>' />
                <br />
                    <br />
                    <asp:Button ID="ButtonApply" runat="server" Text="Ansök jobb" />
                    <hr />
                <br />
                </span>
            </ItemTemplate>
        </asp:ListView>
    </div>
    <asp:SqlDataSource ID="advertisement" runat="server" ConnectionString="<%$ ConnectionStrings:JobbJaktConnectionString %>" SelectCommand="SELECT [AdvertisementID], [RegistrationDate], [Title], [Position], [ExpirationDate], [Category], [Salary], [TypeOfEmployment], [CompanyContactID] FROM [AdvertisementSet] WHERE ([Active] = @Active)">
        <SelectParameters>
            <asp:Parameter DefaultValue="true" Name="Active" Type="Boolean" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="JobbJakt.Advertisement" EntityTypeName="" OrderBy="AdvertisementID desc" Select="new (Advertisement)" TableName="Applications">
    </asp:LinqDataSource>
</asp:Content>

